package com.excesys.exsecs.linkage.handle;

import com.excesys.exsecs.linkage.service.SceneTriggerService;
import lombok.extern.slf4j.Slf4j;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * 消费者线程
 *
 */
@Slf4j
public class MessageConsumers implements Runnable {

	private final SceneTriggerService sceneTriggerService;
	private String unitNo;
	private String timeStamp;

	public MessageConsumers(String unitNo ,String timeStamp,SceneTriggerService sceneTriggerService) {
		this.unitNo = unitNo;
		this.timeStamp =timeStamp;
		this.sceneTriggerService = sceneTriggerService;

	}

	@Override
	public void run() {
		try {
			sceneTriggerService.check(unitNo,timeStamp);
		}
		catch (Exception e) {
			log.error(e.toString());
		}
		finally {
			return;
		}
	}


}
